package br.com.livro.javapersistence.heranca.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;

import br.com.livro.javapersistence.commons.model.CommonField;

@Entity
@Inheritance(strategy = InheritanceType.JOINED)
public class PessoaJuridica extends Pessoa {

	@Column(nullable = false, unique = true)
	private String cnpj;
	@Column
	private String razaoSocial;
	@Column
	private String nomeFantasia;

	/**
	 * 
	 */
	public PessoaJuridica() {
	}

	/**
	 * @param userId
	 * @param commonField
	 * @param cnpj
	 * @param razaoSocial
	 * @param nomeFantasia
	 */
	public PessoaJuridica(CommonField commonField,Long userId, String cnpj, String razaoSocial, String nomeFantasia) {
		super(userId, commonField);
		this.setCnpj(cnpj);
		this.setRazaoSocial(razaoSocial);
		this.setNomeFantasia(nomeFantasia);
	}

	public String getCnpj() {
		return cnpj;
	}

	public void setCnpj(String cnpj) {
		this.cnpj = cnpj;
	}

	public String getRazaoSocial() {
		return razaoSocial;
	}

	public void setRazaoSocial(String razaoSocial) {
		this.razaoSocial = razaoSocial;
	}

	public String getNomeFantasia() {
		return nomeFantasia;
	}

	public void setNomeFantasia(String nomeFantasia) {
		this.nomeFantasia = nomeFantasia;
	}
}
